package com.dream.commons.result;

import java.util.List;
public class PageInfo <T> {

    @SuppressWarnings("unused")
	private final static int PAGESIZE = 10; //默认显示的记录数 
    /**
     * 状态
     * */
    public int code=0;
    /**
     * 状态信息
     * */
    public String msg="";
    /**
     * 总记录 
     */
    private int count; 
    /**
     * 显示的记录  
     */
    private List<T> data;
      
	public PageInfo(int code, String msg, int count, List<T> data) {
		this.code = code;
		this.msg = msg;
		this.count = count;
		this.data = data;
	}
	
	public PageInfo( int count, List<T> data) {
		this.code = 0;
		this.msg = "";
		this.count = count;
		this.data = data;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public List<T> getData() {
		return data;
	}
	public void setData(List<T> data) {
		this.data = data;
	}   
}
